/**
 * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
 * under one or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information regarding copyright
 * ownership.
 *
 * Camunda licenses this file to you under the MIT; you may not use this file
 * except in compliance with the MIT License.
 */

import React from 'react';

import CockpitLink from './CockpitLink';

export default function CockpitProcessInstanceLink(props) {
  const {
    cockpitUrl,
    processInstance
  } = props;

  const {
    id
  } = processInstance;

  const cockpitPath = `process-instance/${id}`;

  return (
    <CockpitLink cockpitUrl={ cockpitUrl } path={ cockpitPath }>
      <div>
        Process instance ID:
        <code>{id}</code>
      </div>
    </CockpitLink>
  );
}
